<div class="grid_12">
    <a href="<?php echo site_url('admin/setting/contactAdd') ?>" class="checker" style="padding:3px 6px;margin-bottom: 7px">Thêm tài khoản mới</a>
    <div id="demo" class="clearfix">
        <table class="display" id="dataTable"> 
            <thead> 
                <tr> 
                    <th>STT</th> 
                    <th>Họ tên</th> 
                    <th>Account</th> 
                    <th>Số điện thoại</th> 
                    <th>Loại</th> 
                    <th>Trạng thái</th> 
                    <th>Action</th> 
                </tr> 
            </thead>
            <tbody>
            <?php $index = 1; ?>
            <?php if(is_array($postInfo)) {?>
                <?php foreach($postInfo as $s): ?>
                    <tr class="<?php echo ($s->status == 1) ? 'gradeA' : 'gradeX' ?>"> 
                        <td class="center"><?php echo $index ?></td> 
                        <td class="center"><?php echo $s->name ?></td>
                        <td class="center"><?php echo $s->acc ?></td>
                        <td class="center"><?php echo $s->phone ?></td>
                        <td class="center"><?php echo $s->type ?></td>
                        <td class="center">
                            <?php 
                                switch ($s->status) {
                                    case 1 : 
                                        echo 'Hiển thị';
                                        break;
                                    case 0 :
                                        echo 'Ẩn';
                                        break;
                                }
                            ?>
                        </td>
                        <td class="center">
                            <a href="<?php echo site_url('admin/setting/contactEdit/' . $s->id) ?>"><img src ="<?php echo STATIC_DOMAIN?>/images/simsodep/edit.png" alt="edit" title="Sửa"></a> 
                            -
                            <?php if($s->status == 1): ?>
                            <a id="icon_hide" href="<?php echo site_url('admin/setting/contactHide/'. $s->id) ?>"><img src ="<?php echo STATIC_DOMAIN?>/images/simsodep/hide.png" width="18" height="18" alt="hide" title="Ẩn"></a>
                            <?php else: ?>
                            <a id="icon_show" href="<?php echo site_url('admin/setting/contactShow/'. $s->id) ?>"><img src ="<?php echo STATIC_DOMAIN?>/images/simsodep/show.png" width="18" height="18" alt="hide" title="Hiện"></a> 
                            <?php endif; ?>
                            -
                            <a class="delete" href="<?php echo site_url('admin/setting/contactDelete/'. $s->id) ?>"><img src ="<?php echo STATIC_DOMAIN?>/images/simsodep/delete.png" alt="delete" title="Xóa"></a>
                        </td>
                    </tr>
                <?php endforeach; ?>
            <?php }?>
            </tbody>
        </table>
    </div>
</div>